package com.googlecode.lightest.core

class RunnerTest extends RunnerTestCase {

    /**
     * Tests that a run results are updated as each test method is run. The
     * test class itself contains assertions that will cause the assertions
     * in this method to fail, should the methods in the test class fail. Yes,
     * it's a little confusing!
     */
    void testIntermediateReportGeneration() {
        runnerSupport.setRefreshReport(true)

        def testClass = ReportGenerationVerifier.class
        def suiteFile = LightestUtils.createSuiteFile([ testClass ])
        def root = runnerSupport.runLightest(suiteFile)

        assertTestMethodStatus(TEST_PASSED, root, 'a')
        assertTestMethodStatus(TEST_FAILED, root, 'b')
        assertTestMethodStatus(TEST_PASSED, root, 'c')
        assertTestMethodStatus(TEST_PASSED, root, 'd')
    }
}